package basics.day18.ArrayList.ArrayLIstReview;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        fun_1();
        fun_2();
    }

    public static void fun_1() {
        ArrayList<Integer> arrayList = new ArrayList<Integer>();
        arrayList.add(11);
        arrayList.add(12);
        arrayList.add(13);
        arrayList.add(14);
        arrayList.add(15);
        for (int i = 0; i < arrayList.size(); i++) {
            System.out.println(arrayList.get(i));
        }
    }

    public static void fun_2() {
        ArrayList<Person> arrayList = new ArrayList<Person>();
        arrayList.add(new Person("张三", 10));
        arrayList.add(new Person("张三1", 11));
        arrayList.add(new Person("张三2", 12));
        arrayList.add(new Person("张三3", 13));
        for (int i = 0; i < arrayList.size(); i++) {
            System.out.println(arrayList.get(i));
        }
    }
}
